home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML 2.0 Sourcebook (2nd Edition)
/
VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso
/
book
/
unix
/
ch10
/
10fig09.wrl
< prev
next >
Wrap
Text File
|
1996-09-22
|
2KB
|
81 lines
#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright 1997 By
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Group {
children [
# Blinking balls
Transform {
translation -2.0 0.0 0.0
children Shape {
appearance Appearance {
material DEF Ball1Color Material {
diffuseColor 0.4 0.4 0.4
}
}
geometry DEF ABall Sphere { }
}
},
Shape {
appearance Appearance {
material DEF Ball2Color Material {
diffuseColor 0.4 0.4 0.4
}
}
geometry USE ABall
},
Transform {
translation 2.0 0.0 0.0
children Shape {
appearance Appearance {
material DEF Ball3Color Material {
diffuseColor 0.4 0.4 0.4
}
}
geometry USE ABall
}
},
# Animation clocks
DEF Clock1 TimeSensor {
cycleInterval 1.0
loop TRUE
},
DEF Clock2 TimeSensor {
cycleInterval 1.3
loop TRUE
},
DEF Clock3 TimeSensor {
cycleInterval 0.7
loop TRUE
},
# Animation paths
DEF Color1Path ColorInterpolator {
key [ 0.0, 0.5, 0.5, 1.0 ]
keyValue [
1.0 1.0 0.0, 1.0 1.0 0.0,
0.0 1.0 0.0, 0.0 1.0 0.0,
]
},
DEF Color2Path ColorInterpolator {
key [ 0.0, 0.5, 0.5, 1.0 ]
keyValue [
0.0 1.0 0.0, 0.0 1.0 0.0,
0.0 0.0 1.0, 0.0 0.0 1.0,
]
},
DEF Color3Path ColorInterpolator {
key [ 0.0, 0.5, 0.5, 1.0 ]
keyValue [
0.5 0.5 0.5, 0.5 0.5 0.5,
1.0 1.0 1.0, 1.0 1.0 1.0,
]
}
]
}
ROUTE Clock1.fraction_changed TO Color1Path.set_fraction
ROUTE Clock2.fraction_changed TO Color2Path.set_fraction
ROUTE Clock3.fraction_changed TO Color3Path.set_fraction
ROUTE Color1Path.value_changed TO Ball1Color.set_emissiveColor
ROUTE Color2Path.value_changed TO Ball2Color.set_emissiveColor
ROUTE Color3Path.value_changed TO Ball3Color.set_emissiveColor